import config from '../../config'
export function MP(ak) {

    return new Promise(function (resolve, reject) {
        window.onload = function () {
            resolve(BMap)
        };
        let script = document.createElement("script");
        script.type = "text/javascript";
        script.src = config.mapUrl+config.mapAk;
        script.onerror = reject;
        document.head.appendChild(script);
    })

}
